<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker,autocomplete"></t:base>
<div>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
	   <t:datagrid name="sysRoleList" checkbox="false" pagination="true" fitColumns="true" title="" sortName="id" actionUrl="sysRoleController.do?datagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="角色编号"  field="id"  hidden="true"  queryMode="group"  width="120"></t:dgCol>
   <t:dgCol title="角色编号"  field="roleid"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="系统编号"  field="sysid"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="角色名称"  field="rolename"  query="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="机构名称"  field="orgid"  query="true"  queryMode="single"  dictionary="SYS_ORGNIZATION,ORGID,ORGNAME"  width="120"></t:dgCol>
   <t:dgCol title="角色类别"  field="roletype"  query="true"  queryMode="single"  dictionary="ROLETYPE"  width="120"></t:dgCol>
   <t:dgCol title="备注"  field="note"  hidden="true"  queryMode="group"  width="120"></t:dgCol>
   <t:dgCol title="是否有效"  field="isvalid"  hidden="true"  queryMode="group"  width="120"></t:dgCol>
   <t:dgCol title="orderid"  field="orderid"  hidden="true"  queryMode="group"  width="120"></t:dgCol>
   <t:dgCol title="应用编号"  field="appid"  hidden="true"  queryMode="group"  width="120"></t:dgCol>
   <t:dgToolBar title="录入" icon="icon-add" url="sysRoleController.do?goAdd" funname="add"></t:dgToolBar>
	<t:dgToolBar title="编辑" icon="icon-edit" url="sysRoleController.do?goUpdate" funname="update"></t:dgToolBar>
   <t:dgToolBar title="查看" icon="icon-search" url="sysRoleController.do?goUpdate" funname="detail"></t:dgToolBar>
   <%-- <t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>
   <t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>
   <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
   <t:dgToolBar title="批量删除"  icon="icon-remove" url="sysRoleController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
   <t:dgDelOpt title="删除" url="sysRoleController.do?doDel&id={id}" urlclass="ace_button"  urlfont="fa-trash-o"/>
   <t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar> --%>
  </t:datagrid>
  </div>
</div>
 <script type="text/javascript">
 
		 //导出
		function ExportXls() {
			JeecgExcelExport("sysRoleController.do?exportXls","sysRoleList");
		}
 
 
	 	function fillData(rowData){ 
	 		//清空表单	
	 		$("#ff").form('clear');
	 		//填充数据
	 		for(var d in rowData){
				$("#"+d).val(rowData[d]);
			}
	 	};
 		$(function(){
	 	
 		 	$("#sysRoleList").datagrid({
				onClickRow: function(rowIndex, rowData){
					fillData(rowData);

					$("#orgid").val(rowData.orgid);
					$("#roletype").val(rowData.roletype);
					$("#orgid").attr("disabled","disabled");
					$("#roletype").attr("disabled","disabled");
					
				}
			});	

			//隐藏滚动条，固定高度，可根据表单字段数量调整
			$("body").css({"overflow": "hidden","height": "600px"});
			 
		 	$("#ff").Validform({
				tiptype:1, 
				dragonfly:false,
				tipSweep:false,
				showAllError:false,
				postonce:true,
				ajaxPost:true
			}); 
 		});
 </script>
 <!--新提示方法改进   美化布局-------------------  -->  
 <style type="text/css">
 	.value{
 		padding: 10px auto 10px 10px;
 	}
 </style>
 	</div>
 	<div style="background-color: #5c9ccc;border: 1px solid #4297d7;">
 		<div style="text-align:center;background-color: #fff;width: 80px;margin-top: 10px;margin-left: 10px;font-size: 3px;padding:5px">
 			<span style="color: #e17009;">详细信息</span>
 		</div>
 	</div>
    <div title="新增数据" style="height:350px;background-color:#fff;overflow-y:auto;"  name="editPanel" id="editPanel"> 
		<t:formvalid formid="ff" dialog="true" layout="table" tiptype="4" action="">
			<input name="id" id="id" type="hidden" value="" /> 
			<table style="width: 600px;margin-bottom:75px" cellpadding="0" cellspacing="1" class="formtable">
				<tbody>
					<tr>
						<td align="right">
							<label class="Validform_label">
								角色编号:
							</label>
						</td>
						<td class="value">
						     <input id="roleid" name="roleid"  readonly="true" type="text" style="width: 150px;" class="" value="">
						</td>
						<td align="right">
							<label class="Validform_label">
								角色名称:
							</label>
						</td>
						<td class="value">
						     <input id="rolename" name="rolename"  readonly="true" type="text" style="width: 150px;" class="" value="">
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								机构名称:
							</label>
						</td>
						<td class="value">
						     <t:dictSelect id="orgid" field="orgid" type="list" dictTable="SYS_ORGNIZATION" dictField="ORGID" dictText="ORGNAME" hasLabel="false"  title="机构名称" ></t:dictSelect> 
						</td>
						<td align="right">
							<label class="Validform_label">
								角色类型:
							</label>
						</td>
						<td class="value">
						     <t:dictSelect id="roletype" field="roletype" type="list"  typeGroupCode="ROLETYPE" hasLabel="false"  title="角色类别" ></t:dictSelect>  
						</td>
					</tr>
				</tbody>
			</table>
		
		</t:formvalid>
    </div>